#include <iostream>
#include <string>

#include "predictor_base.h"
#include "predictor_link.h"

using namespace std;

Predictor_link::Predictor_link(Link_type link_type)
{
  _source = NULL;

  _value = 0.0;
  _simulated_value = 0.0;

  _link_type = link_type;
}

Predictor_link::~Predictor_link()
{
}

Link_type Predictor_link::get_link_type(void)
{
  return _link_type;
}

void Predictor_link::set_source( Predictor_base *p )
{
  _source = p;
}

void Predictor_link::add_target( Predictor_base *p )
{
  _targets.push_back( p );
}

float Predictor_link::get_value( void )
{
  return _value;
}


void Predictor_link::set_value( float v )
{
  _value = v;
}

void Predictor_link::activate( void )
{
  _active = true;
}

void Predictor_link::deactivate( void )
{
  _active = false;
}

bool Predictor_link::active( void )
{
  return _active;
}

void Predictor_link::reset( void )
{
  deactivate();
  set_value( 0.0 );
}


